//
//  KDManageController.m
//  WangJingApp
//
//  Created by 魏强 on 16/12/30.
//  Copyright © 2016年 KDTech. All rights reserved.
//

#import "KDManageController.h"
#import "KDCalendarController.h"
#import "KDMessagePostController.h"
#import "KDNewsAnalysisController.h"
#import "SVProgressHUD.h"
#import "KDManageRequestTool.h"

@interface KDManageController ()
/**
 *  所有主题数据的集合
 */
@property (nonatomic, strong) NSArray * themeArr;
@end

@implementation KDManageController
#pragma mark - 懒加载区
#pragma mark - 懒加载区
- (NSArray *)themeArr
{
    if (!_themeArr) {
        _themeArr = [NSArray array] ;
    }
    return _themeArr;
}
#pragma mark - 生命周期区
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    // 添加所有子控制器
    [self setupAllChildViewController];
    [self loadData];
}

#pragma mark - 板块布置区
#pragma mark - 添加所有子控制器
- (void)setupAllChildViewController
{
    // 管理日历
    KDCalendarController *vc1 = [[KDCalendarController alloc] init];
    vc1.title = @"管理日历";
    [self addChildViewController:vc1];
    
    // 信息报送
    KDMessagePostController *vc2 = [[KDMessagePostController alloc] init];
    vc2.title = @"信息报送";
    [self addChildViewController:vc2];
    
//    // 在控专题
//    KDTopicController *vc5 = [[KDTopicController alloc] init];
//    vc5.title = @"在控专题";
//    [self addChildViewController:vc5];
    
    // 网情分析
    KDNewsAnalysisController *vc6 = [[KDNewsAnalysisController alloc] init];
    vc6.title = @"网情分析";
    [self addChildViewController:vc6];
    
    [super setupManageBtn];
}

#pragma mark - 事件点击区

#pragma mark - 网络请求区
- (void)loadData{
//    KDManagerRequestParam *param = [[KDManagerRequestParam alloc]init];
//    KDAccount *account = [KDAccountTool account];
//    param.comp_id = account.grand_comp_id;
//    NSDateFormatter *fmt = [[NSDateFormatter alloc]init];
//    fmt.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"zh_CN"];;
//    fmt.dateFormat = @"yyyyMMdd";
//
//    param.snap_date = @"20170106";//[fmt stringFromDate:[NSDate date]];
//    param.check_item = @"单位已报送,单位被采分条数;";
////    KDLog(@"%@", param.comp_id);
//    [KDManageRequestTool getUnitMessageWithParam:param success:^(KDManagerRequestResult *responseObejct) {
//        if (responseObejct.status != 1) {
//            [SVProgressHUD showErrorWithStatus:responseObejct.msg maskType:SVProgressHUDMaskTypeGradient];
//        }else{
//            KDLog(@"%@", responseObejct);
//        }
//    } failure:^(NSError *error) {
//        [SVProgressHUD showErrorWithStatus:@"网络错误!" maskType:SVProgressHUDMaskTypeGradient];
//    }];
}
#pragma mark - 通知接收区

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
